package com.ymttest.database.mapping.godmember;

import com.ymttest.database.model.godmember.MchMemberConfig;
import com.ymttest.database.model.godmember.MchMemberConfigExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface MchMemberConfigMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mchmemberconfig
     *
     * @mbggenerated Mon Jun 22 16:15:30 CST 2020
     */
    @SelectProvider(type=MchMemberConfigSqlProvider.class, method="countByExample")
    int countByExample(MchMemberConfigExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mchmemberconfig
     *
     * @mbggenerated Mon Jun 22 16:15:30 CST 2020
     */
    @DeleteProvider(type=MchMemberConfigSqlProvider.class, method="deleteByExample")
    int deleteByExample(MchMemberConfigExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mchmemberconfig
     *
     * @mbggenerated Mon Jun 22 16:15:30 CST 2020
     */
    @Delete({
        "delete from mchmemberconfig",
        "where ShopId = #{shopId,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer shopId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mchmemberconfig
     *
     * @mbggenerated Mon Jun 22 16:15:30 CST 2020
     */
    @Insert({
        "insert into mchmemberconfig (ShopId, OpenPointsOnce, ",
        "OpenPoints, NeedInvitationCode, ",
        "BindType, CollectionMobile, ",
        "CreateTime, UpdateTime, ",
        "DefaultRegTerm)",
        "values (#{shopId,jdbcType=INTEGER}, #{openPointsOnce,jdbcType=BIT}, ",
        "#{openPoints,jdbcType=BIT}, #{needInvitationCode,jdbcType=BIT}, ",
        "#{bindType,jdbcType=INTEGER}, #{collectionMobile,jdbcType=BIT}, ",
        "#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ",
        "#{defaultRegTerm,jdbcType=BIT})"
    })
    int insert(MchMemberConfig record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mchmemberconfig
     *
     * @mbggenerated Mon Jun 22 16:15:30 CST 2020
     */
    @InsertProvider(type=MchMemberConfigSqlProvider.class, method="insertSelective")
    int insertSelective(MchMemberConfig record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mchmemberconfig
     *
     * @mbggenerated Mon Jun 22 16:15:30 CST 2020
     */
    @SelectProvider(type=MchMemberConfigSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="ShopId", property="shopId", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="OpenPointsOnce", property="openPointsOnce", jdbcType=JdbcType.BIT),
        @Result(column="OpenPoints", property="openPoints", jdbcType=JdbcType.BIT),
        @Result(column="NeedInvitationCode", property="needInvitationCode", jdbcType=JdbcType.BIT),
        @Result(column="BindType", property="bindType", jdbcType=JdbcType.INTEGER),
        @Result(column="CollectionMobile", property="collectionMobile", jdbcType=JdbcType.BIT),
        @Result(column="CreateTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="UpdateTime", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="DefaultRegTerm", property="defaultRegTerm", jdbcType=JdbcType.BIT)
    })
    List<MchMemberConfig> selectByExample(MchMemberConfigExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mchmemberconfig
     *
     * @mbggenerated Mon Jun 22 16:15:30 CST 2020
     */
    @Select({
        "select",
        "ShopId, OpenPointsOnce, OpenPoints, NeedInvitationCode, BindType, CollectionMobile, ",
        "CreateTime, UpdateTime, DefaultRegTerm",
        "from mchmemberconfig",
        "where ShopId = #{shopId,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="ShopId", property="shopId", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="OpenPointsOnce", property="openPointsOnce", jdbcType=JdbcType.BIT),
        @Result(column="OpenPoints", property="openPoints", jdbcType=JdbcType.BIT),
        @Result(column="NeedInvitationCode", property="needInvitationCode", jdbcType=JdbcType.BIT),
        @Result(column="BindType", property="bindType", jdbcType=JdbcType.INTEGER),
        @Result(column="CollectionMobile", property="collectionMobile", jdbcType=JdbcType.BIT),
        @Result(column="CreateTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="UpdateTime", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="DefaultRegTerm", property="defaultRegTerm", jdbcType=JdbcType.BIT)
    })
    MchMemberConfig selectByPrimaryKey(Integer shopId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mchmemberconfig
     *
     * @mbggenerated Mon Jun 22 16:15:30 CST 2020
     */
    @UpdateProvider(type=MchMemberConfigSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") MchMemberConfig record, @Param("example") MchMemberConfigExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mchmemberconfig
     *
     * @mbggenerated Mon Jun 22 16:15:30 CST 2020
     */
    @UpdateProvider(type=MchMemberConfigSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") MchMemberConfig record, @Param("example") MchMemberConfigExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mchmemberconfig
     *
     * @mbggenerated Mon Jun 22 16:15:30 CST 2020
     */
    @UpdateProvider(type=MchMemberConfigSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(MchMemberConfig record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mchmemberconfig
     *
     * @mbggenerated Mon Jun 22 16:15:30 CST 2020
     */
    @Update({
        "update mchmemberconfig",
        "set OpenPointsOnce = #{openPointsOnce,jdbcType=BIT},",
          "OpenPoints = #{openPoints,jdbcType=BIT},",
          "NeedInvitationCode = #{needInvitationCode,jdbcType=BIT},",
          "BindType = #{bindType,jdbcType=INTEGER},",
          "CollectionMobile = #{collectionMobile,jdbcType=BIT},",
          "CreateTime = #{createTime,jdbcType=TIMESTAMP},",
          "UpdateTime = #{updateTime,jdbcType=TIMESTAMP},",
          "DefaultRegTerm = #{defaultRegTerm,jdbcType=BIT}",
        "where ShopId = #{shopId,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(MchMemberConfig record);
}